package org.tigris.subversion.svnant.commands;

import java.io.File;
import org.tigris.subversion.svnant.SvnAntUtilities;
import org.tigris.subversion.svnclientadapter.ISVNClientAdapter;
import org.tigris.subversion.svnclientadapter.SVNClientException;
import org.tigris.subversion.svnclientadapter.SVNRevision;
import org.tigris.subversion.svnclientadapter.SVNUrl;

public class Switch extends SvnCommand
{
  private static final String MSG_CANNOT_SWITCH = "Cannot switch to url : %s";
  private File path = null;
  private SVNUrl url;
  private SVNRevision revision = SVNRevision.HEAD;
  private boolean recurse = true;

  public void execute()
  {
    try
    {
      getClient().switchToUrl(this.path, this.url, this.revision, this.recurse);
    }
    catch (SVNClientException localSVNClientException)
    {
      throw ex(localSVNClientException, "Cannot switch to url : %s", new Object[] { this.url.toString() });
    }
  }

  protected void validateAttributes()
  {
    SvnAntUtilities.attrNotNull("path", this.path);
    SvnAntUtilities.attrNotNull("url", this.url);
    SvnAntUtilities.attrNotNull("revision", this.revision);
  }

  public void setPath(File paramFile)
  {
    this.path = paramFile;
  }

  public void setRecurse(boolean paramBoolean)
  {
    this.recurse = paramBoolean;
  }

  public void setRevision(String paramString)
  {
    this.revision = getRevisionFrom(paramString);
  }

  public void setUrl(SVNUrl paramSVNUrl)
  {
    this.url = paramSVNUrl;
  }
}

/* Location:           C:\Users\Administrator\Desktop\svnant.jar
 * Qualified Name:     org.tigris.subversion.svnant.commands.Switch
 * JD-Core Version:    0.6.0
 */